<template>
  <div class="box">
    <div class="form">
      <el-table :data="tableData" style="width: 100%" border>
        <el-table-column label="设备名称">预热罩</el-table-column>
        <el-table-column label="功耗">
          <template slot-scope="scope">
            <el-input v-model.number="scope.row.yrzConsumUp"></el-input>
          </template>
        </el-table-column>
        <el-table-column label="预热罩内温">
          <el-table-column label="上限">
            <template slot-scope="scope">
              <el-input v-model.number="scope.row.yrzTempUp"></el-input>
            </template>
          </el-table-column>
          <el-table-column label="下限">
            <template slot-scope="scope">
              <el-input v-model.number="scope.row.yrzTempDown"></el-input>
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="胎膜温度">
          <el-table-column label="上限">
            <template slot-scope="scope">
              <el-input v-model.number="scope.row.yrzGlassTempUp"></el-input>
            </template>
          </el-table-column>
          <el-table-column label="下限">
            <template slot-scope="scope">
              <el-input v-model.number="scope.row.yrzGlassTempDown"></el-input>
            </template>
          </el-table-column>
        </el-table-column>
      </el-table>
      <el-button type="primary" @click="postParamterSet">提交</el-button>
    </div>
  </div>
</template>

<script>
import { getparamterSet, postparamterSet } from "@/api/system/parameterSet";
export default {
  name: "parameterSet",
  data() {
    return {
      //   form: {
      //     name: "lee",
      //   },
      tableData: [
        {
          yrzConsumUp: 1,
        },
      ],
    };
  },
  mounted() {
    this.getParamterSet();
    this.postParamterSet();
  },
  methods: {
    getParamterSet() {
      getparamterSet().then((res) => {
        this.tableData = res.data;
        console.log(this.tableData);
      });
    },
    postParamterSet() {
      postparamterSet(this.tableData).then((res) => {
        console.log(res.msg);
        console.log("yyds", this.tableData);
      });
    },
  },
};
</script>

<style scoped>
.form1 {
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>
